Repository navigation
fix(mcpx): make supervised stdio opt-in again - #11343
Conversation
#9963 made supervised stdio the default, and about 20 mcpx e2e tests have failed on main since. The supervisor socket is keyed by server name only (SupervisorSocketPath), so a server's second scoped instance (another session, repo or worktree scope) attached to the first instance's supervisor and was refused ("supervisor refused attach: already attached"), and supervisors outlived `mcpx stop`, leaving sockets and child processes behind. Stop materializing the default at file load: "supervised": true still opts in and everything #9963 added for it (restart through the supervisor, adopt-or-reap scan) is unchanged. The default can return once sockets are keyed per instance and stop reaps supervisors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Before: since #9963 (supervised stdio by default) merged on Nov 16, about 20 mcpx e2e tests fail on main. The supervisor socket is keyed by server name only (
SupervisorSocketPath(stateDir, name)), so a server's second scoped instance (another session, repo or worktree scope) dials the first instance's supervisor and getssupervisor refused attach: already attached. Supervisors also outlivemcpx stop, so the no-orphan and inline-mode tests find leftoversup-*.socksockets and children.After: stdio servers run direct-spawn unless the config says
"mcpx": {"supervised": true}. With the default off, 20 of the 24 locally failing e2e tests pass. The other four are fixed in #11342.How: stop materializing
supervised: trueat file load. Everything else from #9963 (restart through the supervisor, adopt-or-reap scan, alias inheritance) is unchanged and still applies to servers that opt in. The two default tests now assert opt-in behavior.To bring the default back, the socket needs to be keyed per instance (pool identity plus scope key), and
mcpx stopneeds to reap supervisors.Testing:
go test ./internal/config ./internal/pool ./internal/mcpclient ./internal/daemonpasses; the previously failing e2e tests pass locally.Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.